-- sunshine_bonus
-- create by panyl
-- 道具：  致命伤害

return {
    apply = function(source, target, classId, value)
        -- 太阳花强化太阳光专用
        local level = 0;
        local dbase = PropertyM.query(classId, "dbase") or {};
        local path = dbase["prop_path"];
        if not path then
            path = "mixed";
        end

        -- 太阳花专属加强效果
        local prop = PropM.combine(source, "sunshine", 1);
        level = PropM.apply(prop, level);

        -- 奖励
        local arr;
        for i=1, level + 1 do
            arr = value[i];

            if type(arr[1]) == 'number' then
                -- 单个奖励
                BonusM.doBonus(arr, "apply_property");
            else
                -- 多个奖励
                for _, bonus in pairs(arr) do
                    BonusM.doBonus(bonus, "apply_property");
                end
            end
        end
    end,
};
